<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>案例列表页</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        
        li {
            list-style: none;
        }
        
        img {
            vertical-align: top;
        }
        
        input {
            outline: none;
        }
        
        a {
            text-decoration: none;
        }
        
        body {
            position: relative;
        }
        /* 版心 */
        
        .head-con,
        .banner-con,
        .content-con,
        .footer-con {
            width: 1100px;
            margin: 0 auto;
        }
        /* 头部 */
        
        .head {
            width: 100%;
            height: 50px;
            background-color: #323232;
        }
        
        .head-con {
            height: 50px;
        }
        
        .left {
            width: 180px;
            height: 116px;
            position: absolute;
            z-index: 1;
            float: left;
        }
        
        .head-con ul {
            margin-left: 210px;
            width: 520px;
            height: 50px;
            float: left;
        }
        
        .head-con li {
            width: 85px;
            height: 50px;
            font-size: 13px;
            color: #a6a6a6;
            line-height: 50px;
            text-align: center;
            cursor: pointer;
            float: left;
        }
        
        .head-con ul li a {
            color: #a6a6a6;
            text-decoration: none;
        }
        
        .head-con li:hover {
            color: #fff;
            background-color: #dd4012;
        }
        
        .right {
            width: 270px;
            height: 18px;
            margin-top: 15px;
            float: right;
        }
        /* 通栏 */
        
        .banner {
            width: 100%;
            height: 220px;
            background: url(img/1/2.png) no-repeat;
            background-size: cover;
            position: relative;
        }
        
        .nav1 {
            width: 100%;
            height: 30px;
            background-color: rgba(0, 0, 0, 0.4);
            position: absolute;
            bottom: 0;
        }
        
        .banner-con li a {
            font-size: 13px;
            line-height: 30px;
            color: #a6a6a6;
            float: left;
        }
        /* 内容 */
        
        .content {
            background-color: #ced1d1;
        }
        
        .content-con {
            overflow: hidden;
        }
        
        .content-con ul {
            width: 414px;
            height: 27px;
            margin-top: 25px;
        }
        
        .content-con ul li {
            width: 77px;
            height: 27px;
            text-align: center;
            line-height: 27px;
            font-size: 11px;
            color: #636363;
            background-color: #fff;
            margin-right: 5px;
            float: left;
            cursor: pointer;
        }
        
        .content-con ul li:hover {
            color: #fff;
            background-color: #636363;
        }
        
        #copy,
        .chanpin {
            width: 260px;
            height: 235px;
            background-color: #fff;
            margin-top: 33px;
            margin-right: 20px;
            margin-top: 15px;
            float: left;
        }
        
        #copy a {
            text-decoration: none;
        }
        
        h3 {
            font-size: 15px;
            color: black;
            margin-left: 13px;
            margin-top: 15px;
            margin-bottom: 9px;
        }
        
        h4 {
            font-size: 12px;
            color: #939292;
            margin-left: 13px;
            margin-top: 8px;
        }
        
        .chanpin:nth-of-type(4),
        .chanpin:nth-of-type(8),
        .chanpin:nth-of-type(12),
        .chanpin:nth-of-type(16) {
            margin-right: 0;
        }
        
        .noe {
            margin-left: 420px;
        }
        
        .noe ul li {
            margin: 18px 0 18px 0;
            width: 38px;
            height: 38px;
            border: 1px solid black;
            float: left;
            list-style: none;
            text-align: center;
            line-height: 38px;
            margin-right: 5px;
            background-color: #FFFFFF;
        }
        
        .noe ul li:hover {
            background-color: #dd4012;
        }
        /* 尾部 */
        
        .footer {
            width: 100%;
            height: 82px;
            background-color: black;
        }
        
        .footer-con img {
            width: 166px;
            height: 35px;
            margin-top: 25px;
        }
        
        .footer-right {
            width: 622px;
            float: right;
        }
        
        .footer-right p {
            font-size: 13px;
            line-height: 22px;
            color: #999999;
            float: right;
        }
        
        .footer-right p:nth-of-type(1) {
            margin-top: 24px;
        }
    </style>
</head>

<body>
    <div class="head">
        <div class="head-con">
            <img src="img/1/logo.png" alt="" class="left">
            <ul>
                <li>
                    <a href="index.html">网站首页</a>
                </li>
                <li><a href="">传悦资源</a></li>
                <li><a href="anli-liebiaoye.html">传悦案例</a></li>
                <li><a href="">传悦服务</a></li>
                <li><a href="jiejuefangan-liebiaoye.html">解决方案</a></li>
                <li><a href="">需求提交</a></li>
            </ul>
            <img src="img/1/1.2.png" alt="" class="right">
        </div>
    </div>
    <div class="banner">
        <div class="nav1">
            <ul class="banner-con">
                <li><a href="index.html">网站首页&nbsp;</a></li>
                <li><a href="anli-liebiaoye.html">传悦案例</a></li>
            </ul>
        </div>
    </div>
    </div>
    <div class="content">
        <div class="content-con">
            <ul>
                <li>全部</li>
                <li>网站建设</li>
                <li>推广运营</li>
                <li>品牌策划</li>
                <li>网络全案</li>
            </ul>
            <div class="box2">

            </div>
            <div id="copy" style="display: none;">
                <a href="">
                    <img src="" alt="" class="tupian">
                    <h3 class="title"></h3>
                    <hr>
                    <h4 class="title1"></h4>
                </a>
            </div>
            <div class="noe">
                <ul>
                    <li>
                        <</li>
                            <li>1</li>
                            <li>2</li>
                            <li>3</li>
                            <li>4</li>
                            <li>></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="footer">
        <div class="footer-con">
            <img src="img/1/4.1.png" alt="">
            <div class="footer-right">
                <p>关于传悦&nbsp;&nbsp;&nbsp;&nbsp;新闻动态&nbsp;&nbsp;&nbsp;&nbsp;传悦观点&nbsp;&nbsp;&nbsp;&nbsp;联系传悦&nbsp;&nbsp;&nbsp;&nbsp;加入传悦&nbsp;&nbsp;&nbsp;&nbsp;付款账户</p>
                <p>Copyri ght 2013 创梦网络科技有限责任公司 || 传悦 Chnyoo.cn All Ri ghts Reserved 京ICP备12005221号</p>
            </div>
        </div>
    </div>
    <script>
        let http = new XMLHttpRequest()
        http.open("get", "http://10.35.164.110:81/anlibiao")
        http.send()
        http.onreadystatechange = function() {
            if (http.readyState === 4) {
                console.log(http.responseText);
                let liebiao1 = JSON.parse(http.responseText);
                let copy = document.getElementById("copy");
                let box2 = document.getElementsByClassName("box2")[0];
                console.log(box2);

                liebiao1.forEach(function(item) {
                    let newItem = copy.cloneNode(true);
                    newItem.id = "";
                    newItem.className = "chanpin";
                    newItem.style.display = "block";
                    box2.appendChild(newItem);
                    newItem.setAttribute("data-id", item.id);
                    newItem.querySelector(".tupian").src = item.albimg1;
                    newItem.querySelector(".title").innerHTML = item.albtitle;
                    newItem.querySelector(".title1").innerHTML = item.albtext;
                    let newid = newItem.getAttribute("data-id");
                    newItem.querySelector("a").href = `http://10.35.164.110:81/anlibiao1?id=${newid}`;
                    // console.log(item.id);
                    // console.log(newItem.id);

                })
            }
        }
    </script>
</body>

</html>